<include file="inc:header" />	
<div class="page" id='{$data.act}'>
<include file="inc:title" />
<div class="content">
<!-- 这里是页面内容区 -->

<script type="text/javascript">
 		//调用微信JS api 支付
		function jsApiCall()
		{
			WeixinJSBridge.invoke(
				'getBrandWCPayRequest',
				{$data.jsApiParameters},
				function(res){
					
 					if(res.err_msg=='get_brand_wcpay_request:fail'){
						//$.alert(res.err_code+res.err_desc+res.err_msg);
						$.alert('支付失败',function(){
							
						});
					}
					if(res.err_msg=='get_brand_wcpay_request:cancel '){
						$.alert('支付取消',function(){
							
						});
					}
					if(res.err_msg=='get_brand_wcpay_request:ok'){
						$.alert('恭喜您支付成功',function(){
							//location.href="{url_wap r="deal#index" p="id=$data.deal_id"}";
							window.location.href='{:U('ucinchargelog/index'}';
						});
					}else{
						//$.showSuccess(res.err_msg);
					}
 				}
			);
		}

		function callpay()
		{
			if (typeof WeixinJSBridge == "undefined"){
			    if( document.addEventListener ){
			        document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
			    }else if (document.attachEvent){
			        document.attachEvent('WeixinJSBridgeReady', jsApiCall); 
			        document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
			    }
			}else{
			    jsApiCall();
			}
		}
        function  callpay_1() {
            wx.chooseWXPay({$data.jsApiParameters});
        }
	</script>
	<div class="blank10"></div>
<!-- {$data.jsApiParameters}-->
<div class="pay_order_index p15">
	<if condition="$data.data.notice_sn">
 	<div class="pay_info">
		<div class="h font-fc8" style="font-size:15px;">订单编号：{$data.data.notice_sn}</div>
 	</div>
	</if>

	<div class="w_b but_box_parent padding">
				<div class="w_b_f_1 but_box">	    									   
					<a href="#" class="but_this"  <if condition="$type eq 'V4'"> onclick="callpay_1()"<else/> onclick="callpay()"</if>>支付 {$data.data.money_format}</a>
				</div>
			</div>
</div>

{include file="inc/footer.html"} 
 